package com.yanqingying.controller;

import com.yanqingying.ClazzCountOption;
import com.yanqingying.JobOption;
import com.yanqingying.Result;
import com.yanqingying.service.impl.ReportServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/report")
public class ReportController {
    @Autowired
    ReportServiceImpl reportService;
    @GetMapping("/empGenderData")
    public Result empDate(){
        List<Map> list = reportService.empGenderData();
        return Result.success(list);
    }
    @GetMapping("/empJobData")
    public Result empJobData(){
        JobOption jobOption = reportService.empJobData();
        return Result.success(jobOption);
    }
    @GetMapping("/studentDegreeData")
    public Result studentDegreeData() {
        List<Map> studentDegreeData = reportService.studentDegreeData();
        return Result.success(studentDegreeData);
    }

    @GetMapping("/studentCountData")
    public Result studentCountData() {
        ClazzCountOption clazzCountOption = reportService.studentCountData();
        return Result.success(clazzCountOption);
    }


}
